using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;


namespace Data.DataSources {
	public class StateFlows_GroupsDataSource : ObjectDataSourceBase {
		public override string SelectViewName { get { return "t_StateFlow_Groups"; } }
		public override string InsertViewName { get { return "t_StateFlow_Groups"; } }
		public int StateFromID = -1;
		public int StateToID = -1;
		public StateFlows_GroupsDataSource() { }
		protected override void OnInit(EventArgs e) {
			base.OnInit(e);
			SelectParameters.Add("StateFromID", TypeCode.Int32, StateFromID + "");
			SelectParameters.Add("StateToID", TypeCode.Int32, StateToID + "");
		}
		public DataView SelectEx(int StateFromID, int StateToID) {
			if(StateFromID >= 0) {
				Where.Add("StateFromID=@StateFromID");
				Where.Add("StateToID=@StateToID");
			}
			return Select("", StateFromID, StateToID);
		}
		public void DeleteEx(int StateFromID, int StateToID, string GroupName) {
			Delete("StateFromID=@StateFromID AND StateToID=@StateToID AND GroupName=@GroupName",StateFromID, StateToID, GroupName);
		}
	}
}